<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head th:replace="~{include/head::head}"></head>
<body>
<div th:replace="~{include/head::topbar}"></div>
<div class="container">
    <div th:replace="~{include/head::memberTop}"></div>
    <div class="row" style="margin-top: 15px;">
        <div class="col-md-3">
            <div th:replace="~{include/head::memberLeft}"></div>
        </div>
        <div class="col-md-9">
            <div class="panel panel-default">
                <div class="panel-heading">个人资料</div>
                <div class="panel-body">
                    <form class="form-horizontal" enctype="multipart/form-data" th:action="@{/member/profile}" method="post">
                        <div class="form-group">
                            <label for="userName" class="col-sm-2 control-label">用户名</label>
                            <div class="col-sm-10">
                                <input type="text" class="form-control" disabled readonly id="userName" th:value="${userInfo.user}">
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="name" class="col-sm-2 control-label">名称</label>
                            <div class="col-sm-10">
                                <input type="text" class="form-control" name="name" id="name" placeholder="请输入名称" th:value="${userInfo.name}">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">性别</label>
                            <div class="col-sm-10">
                                <div class="radio-inline" th:each="sexItem,each:${sex}">
                                    <label>
                                        <input type="radio" name="sex" th:checked="${each.index == userInfo.sex}" th:value="${each.index}">
                                        [[${sexItem}]]
                                    </label>
                                </div>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">头像</label>
                            <div class="col-sm-10">
                                <img th:if="${userInfo.avatar != null}" th:src="${userInfo.avatar}" class="img-circle" style="width:100px;height:100px;" />
                                <input type="file" name="avatar" id="exampleInputFile">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">技能</label>
                            <div class="col-sm-10">
                                <div class="checkbox" th:each="skill:${skills}">
                                    <label>
                                        <input type="checkbox" name="skill[]" th:checked="${#lists.contains(userSkills,skill)}" th:value="${skill}"> [[${skill}]]
                                    </label>
                                </div>
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="col-sm-offset-2 col-sm-10">
                                <button type="submit" class="btn btn-info">更新信息</button>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
</body>
</html>